Skip to content

spec-extractor: switch round-robin to git-based README version stamps#31813

Merged
pelikhan merged 6 commits into
mainfrom
copilot/use-git-file-version-stamps
May 13, 2026
Merged

spec-extractor: switch round-robin to git-based README version stamps#31813
pelikhan merged 6 commits into
mainfrom
copilot/use-git-file-version-stamps

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

✨ Enhancement

The spec-extractor package selection logic now derives rotation order from git file history instead of cache-memory state. This makes selection stateless and reproducible, while ensuring packages without a README are prioritized first (timestamp=0).

What does this improve?

  • Stateless rotation

    Selection order is computed from git version stamps for pkg/*/README.md, removing dependence on /tmp/gh-aw/cache-memory/spec-extractor/rotation.json.
  • New package prioritization

    Packages with no README commit history are assigned 0 and sorted first, so newly added packages are processed before previously stamped ones.
  • Deterministic scheduling

    Round-robin input order is stable from any checkout with the same git history; cache eviction/reset no longer affects selection behavior.

Why is this valuable?

  • Eliminates rotation drift/reset caused by ephemeral cache state.
  • Makes scheduling behavior auditable from repository history alone.
  • Preserves fairness while improving first-time package coverage.

Implementation approach:

  • Pre-agent package selection rewrite

    Replaced index-based cache rotation with git stamp collection + sort-based selection.
  • Context contract update

    Updated /tmp/pkg-context.md metadata fields to report git-stamp-derived selection state instead of last_index.
  • Prompt/guidance alignment

    Updated workflow guidance text to reflect stateless git-stamp rotation semantics.
# per package stamp: latest README commit timestamp, or 0 if missing/untracked
stamp=$(git log -1 --format=%ct -- "pkg/$pkg/README.md" 2>/dev/null || echo 0)

# select oldest stamps first (new packages == 0)
printf '%s\t%s\n' "$stamp" "$pkg" | sort -n -k1,1

Validation note from the optimization report: spec-extractor compiled successfully with no errors or warnings.

Copilot AI and others added 2 commits May 12, 2026 23:44
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Use git file version stamps for round-robin selection spec-extractor: switch round-robin to git-based README version stamps May 12, 2026
Copilot AI requested a review from pelikhan May 12, 2026 23:47
@pelikhan pelikhan marked this pull request as ready for review May 13, 2026 00:05
Copilot AI review requested due to automatic review settings May 13, 2026 00:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

The PR description states it updates spec-extractor round-robin package selection to a stateless, git-stamp-based approach, but the actual code changes in this diff appear limited to formatting/whitespace adjustments and a regenerated workflow header.

Changes:

  • Removed an extraneous blank line in a Go workflow test.
  • Reformatted a dynamic import destructuring statement in a Vitest test.
  • Updated the autogenerated metadata header (compiler_version) in agentic_commands.yml.
Show a summary per file
File Description
pkg/workflow/shared_workflow_test.go Removes an extra whitespace-only line in a test file.
actions/setup/js/assign_agent_helpers.test.cjs Reflows an await import() destructuring assignment for readability.
.github/workflows/agentic_commands.yml Updates the generated header comment (compiler_version).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread .github/workflows/agentic_commands.yml Outdated
@@ -1,4 +1,4 @@
# gh-aw-commands: {"payload_version":"v1","schema_version":"v1","compiler_version":"796aca5","commands":["ace","approach-validator","archie","brave","cloclo","craft","grumpy","mergefest","nit","plan","poem-bot","review","security-review","summarize","tidy","unbloat"],"workflows":["ace-editor","approach-validator","archie","brave","cloclo","craft","grumpy-reviewer","mergefest","pdf-summary","plan","poem-bot","pr-code-quality-reviewer","pr-nitpick-reviewer","security-review","tidy","unbloat-docs"]}
# gh-aw-commands: {"payload_version":"v1","schema_version":"v1","compiler_version":"b071b66","commands":["ace","approach-validator","archie","brave","cloclo","craft","grumpy","mergefest","nit","plan","poem-bot","review","security-review","summarize","tidy","unbloat"],"workflows":["ace-editor","approach-validator","archie","brave","cloclo","craft","grumpy-reviewer","mergefest","pdf-summary","plan","poem-bot","pr-code-quality-reviewer","pr-nitpick-reviewer","security-review","tidy","unbloat-docs"]}
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

Copilot AI and others added 2 commits May 13, 2026 00:18
…version-stamps

# Conflicts:
#	.github/workflows/agentic_commands.yml

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot merge main and recompile

Done. I merged main in ff6079b67e and recompiled in 95e6861768.

@pelikhan pelikhan merged commit 53578e3 into main May 13, 2026
24 checks passed
@pelikhan pelikhan deleted the copilot/use-git-file-version-stamps branch May 13, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[q] use git file version stamps for round-robin selection

3 participants